Pixelated (bitmap) images are fantastic at conveying photorealism, but they are not always the best choice for displaying detailed and consistent graphical information:
We cannot scale bitmap images without losing
precision:
Bitmap images are made up of a fixed number of
pixels, so they only look their best at a specific size and resolution
and become pixelated/blurry when resized (they can be made smaller, but
not bigger).
Bitmaps are often large and resource-hungry:
Every pixel in a bitmap image is associated with a separate piece of
memory in the computer. This means that detailed images can be very
large, difficult to edit and share, and their quality is dependent on
the software and hardware used to view them.
Vectors are scalable with no loss of quality
Instead of containing a fixed number of square pixels, vector graphics
store information about objects as points on a plane, connected by
mathematical equations that describe their shape and relationships to
one another.
Files are much smaller
Vector graphics can
be more easily edited, shared and stored than bitmap images.
The image always looks the same, on screen or printed, regardless of the size or resolution All this makes them a great choice for precise/detailed plots, schematics, infographics, graphical abstracts and posters.
Almost any type of graphic you can imagine.. but most relevant to us as scientists:
It requires a little bit of practice to get to grips with vector graphics software, but you don’t need to be an artist or designer to make use of these tools. There are some considerations to keep in mind when using vector graphics:
Tip! If you’re working in Illustrator, files will be .ai natively, and if you’re working in Inkscape it will be .svg. I recommend you always keep a copy of your file in the native format of the software it was created in, and save any exports as a new version, just incase something goes wrong down the line. It’s easy to export a .ai file into a .eps, but not necessarily the other way around…
You can easily save plots from R as vectors that can then be edited in a vector graphics software. In RStudio you can use ggsave, in vscode you can save plots directly as svg files from the viewing pane.
It’s important to bear in mind though, that the more heavily manually edited a plot is, the less reproducible it is. Before editing a plot it’s worth asking yourself whether a coding solution might be a better option first!
The two main types of colour models are RGB (Red, Green, Blue) (used primarily for digital display) and CMYK (Cyan, Magenta, Yellow, Black) (used primarily for print). It’s important to consider the colours of your work before you start. Just remember that a graphic produced with RGB colours will look different when printed and visa versa.
Which to choose for both print and screen? There isn’t an
obvious answer but I usually create the image in RGB first because of
the wider choice of colours available for digital displays. Just
remember that before printing, you might want to convert the image to
CMYK to ensure accurate colour reproduction.
Note! While Illustrator has a built in engine for converting between colour models, in Inkscape it’s a bit more tricky, and you might have to use a different software - I think Scribus is the most commonly used free option.
There are countless options! I’ve dabbled in a few but the two most popular are probably Inkscape and Illustrator. They both have their pros and cons and I’ve listed a few below:
| Inkscape | Illustrator |
|---|---|
| Very accessible (free and open source) with community driven updates | Requires a licences subscription with Adobe (free for UoS staff and students upon request, but expensive otherwise) |
| .svg native format. May struggle with some complex file types | .ai native format, more flexible at handling complex file types. Seamless workflow with other Adobe software |
| RGB native colour model, external software needed for colour model conversion | RGB or CMYK colour models easily specified with a built in colour model conversion engine |
| Can have stability issues, but has fewer system requirements | Pretty stable, however can require a huge amount of RAM for big files and won’t run well on old/certain systems |
| Lacks some tools and features, however realistically it has everything you need for simple graphics and posters | Has a lot of specialised tools and functions. The industry standard |
| Many community resources out there for learning, with a shallower learning curve than Illlustrator | Steeper learning curve, so not as suitable for beginners, fewer community resources |
Note this is not an exhaustive tutorial, but just a list of the most important tools and features I think you’ll need to get started
From the Inkscape manual
Toolbox: Tool selection
Working page area: You can use the canvas outside but it won’t be rendered in the final export
Docking area: Dialogs for specific tool functions
Commands bar: Quick access to common commands
Snap controls: Useful for aligning objects but can be irritating. I recommend turning snapping off to start with
Palette: Basic usage for changing object fill (shift + click for stroke/outline). Change palette on the right
Tool control bar: More adjustable options for the selected tool
Future you will thank you for taking the time to organise objects into layers!
You can shift to select multiple objects, then group them (right click + group) to move and adjust objects together, and gather them under the same layer controls.
There are currently around 23 primary tools in Inkscape, but you’re not likely to use all of them (for now). Only a few are really necessary to get started. I’ll show you the tools I’ve found most useful.
Selector tool: The primary tool you’ll use to navigate your workspace, move, rotate, scale and select objects.
Node tool: You’ll use this to edit the shape of objects. I’ll talk more about nodes below
Shape tools: Quickly create rectangles, circles, stars and polygons. Use the tool control bar for more options
Pen tool: You’ll use this to draw precise lines and shapes by hand. It takes a little work to get the hang of, but once you do you’ll find it the most versatile and useful tool at your disposal.
Text tool: You can guess what this does. You can change the font, size, colour, alignment and more in the text dialog in the docking area.
Gradient tool: This one you might not use as much, but it’s a nice way to add some depth to your work.
Dropper and bucket tools: You’ve probably used these in Paint, they provide quick and easy ways to change the colour of objects
Connector tool: This is possibly another slightly obscure tool, but it’s useful for drawing straight lines, flow charts and diagrams
Tip! Each node on a path needs to be calculated and rendered by the software. The more nodes your shape has, the more complex it becomes and the heavier the load on your system. Past a certain point this can create significant lag (particularly in Inkscape), so it’s best to keep your shapes as simple as possible. The simplify tool can automatically reduce the number of nodes in an overly complex object. Try this using ctrl + L on a selected object and see how it responds. You can also manually remove excess nodes. Learning how to use the pen tool properly is a great way to minimise excessive node use (more on this later).
Tip!Like the settings you applied to one object (or text box) and want to apply it to other objects? Select the object and ctrl + C it, then select the object you want to apply the settings to and ctrl + shift + V. This will apply the shapes colour, stroke and other attributes to the new object.
The compositor for the journal will convert your image to journal specifications accordingly, but it’s best to send them the best quality images you can. Generally, 600DPI (DPI = dots per inch) is the standard for print, and 300DPI is the standard for web. You can’t go wrong saving your work at 600DPI.. but it’s worth checking journal requirement first.
There is sometimes a width and height limit for your work as well, best to check this when setting up document properties but it’s generally easy to rescale your work down the line if you need to.
Journals prefer .eps files for final submission, but first submissions usually have more relaxed preferences - again, check journal specifications. And for your own sanity save a copy of your work in the native format.